<div id="legal" class="content">
  <h1 class="inline">Legal</h1>


<?php
  $this->Html->addCrumb('Legal');
?>

  <?php
  $this->Html->scriptStart(array('inline' => false));
  echo '
    $(function(){
    var $headers = $("#legalContent h1");
      if ($headers.size()>0) {
      $("#legalNav ul").empty();
      var count=1;
       $.each($headers, function(index, value){
       $(this).append("<a name=\'heading_"+count+"\'></a>");
        $("#legalNav ul").append("<li><a href=\'#heading_"+count+"\'>"+$(this).text()+"</a></li>");
        count++;
       });
       $("#legalNav").show();
      }
    });';
  $this->Html->scriptEnd();
  ?>

  <div id="legalNav" style="display:none;">
    <ul>
    </ul>
  </div>

  <div id="legalContent">

  <?php
     if(isset( $contents['Content']['info'])) {
       echo nl2br($contents['Content']['info']);
     }
  ?>
  </div>

</div>